#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <string>
#include <vector>
#include <unordered_map>
#include <algorithm>
#include <map>
using namespace std;

int main() {
    int n, m;
    long long  kmday = 0, kmhappy = 0, kmshame = 0;
    long long  tmday = 0, tmhappy = 0, tmshame = 0;
    cin >> n >> m;
    long long arr[100001] = { 0 };
    long long  brr[100001] = { 0 };
    long long  tmp = 0;
    for (int i = 0; i < n; i++)
    {
        cin >> arr[i];
        if (tmp < m) { kmhappy += arr[i]; tmp++; }
    }
    tmp = 0;
    for (int i = 0; i < n; i++)
    {
        cin >> brr[i];
        if (tmp < m) { kmshame += brr[i]; tmp++; }
    }
    tmhappy = kmhappy;
    tmshame = kmshame;
    long long  left = 0, right = m;
    while (right < n)
    {
        tmhappy += arr[right];
        tmshame += brr[right];
        while (right - left + 1 > m)
        {
            tmhappy -= arr[left];
            tmshame -= brr[left];
            left++;
        }
        if (tmhappy > kmhappy)
        {
            kmday = left;
            kmhappy = tmhappy;
            kmshame = tmshame;
        }
        else if (tmhappy == kmhappy)
        {
            if (tmshame < kmshame)
            {
                kmday = left;
                kmhappy = tmhappy;
                kmshame = tmshame;
            }
        }
        right++;
    }
    cout << kmday + 1;
    return 0;
    return 0;
}